package com.example.demo2.test.controller;

import com.example.demo2.test.service.BinanceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author ChenXi
 * @Date 2023/03/27/15:35
 */

@RestController
@Slf4j
public class BianController {

    @Autowired
    private BinanceService binanceService;


    @RequestMapping("/bian")
    public String bianTest(){
        binanceService.binanceMarket();
        return "bian controller 申请链接了";
    }

    @RequestMapping("/bian/SUBSCRIBE")
    public String SUBSCRIBE(){
        binanceService.SUBSCRIBE();
        return "bian controller 申请订阅了了";
    }

    @RequestMapping("/bian/LIST_SUBSCRIPTIONS")
    public String LIST_SUBSCRIPTIONS(){
        binanceService.LIST_SUBSCRIPTIONS();
        return "bian controller 订阅信息流";
    }

    @RequestMapping("/bian/aggTrade")
    public String aggTrade(){
        binanceService.aggTrade();
        return "bian controller aggTrade";
    }
}
